package com.herui.ota.enums;

public enum UserIdentityEnum {

    ADMIN(0, "管理员"), USER(1, "用户"),
    USER_STAFF(2, "员工"),
            ;

    private Integer code;

    private String message;

    UserIdentityEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static UserIdentityEnum decode(String s){
        UserIdentityEnum[] values = UserIdentityEnum.values();
        for (int i = 0; i < values.length; i++) {
            if (values[i].toString().equals(s)){
                return values[i];
            }
        }
        return null;
    }
}
